using Mapster;
using Vin.Extension.Framework.Dto;
using Vin.Extension.Framework.Implement;
using Vin.Extension.Framework.Quartz.Dto.Entities;
using Vin.Extension.Framework.Quartz.Entities;
using Vin.Extension.Framework.Quartz.Repository;
using Vin.Extension.Framework.Quartz.ServiceInterface;

namespace Vin.Extension.Framework.Quartz.Service;

public class SysJobGroupService : VinFrameworkBaseRecordServiceAsync<SysJobGroupDto, VinFrameworkBaseListDto,
    SysJobGroupRepository, SysJobGroup>, ISysJobGroupService
{
    public async Task<SysJobGroupDto> QueryOrCreateByNameAsync(string name)
    {
        return (await _baseRepository.GetOrCreateByNameAsync(name)).Adapt<SysJobGroupDto>();
    }
}